﻿@model KingRoad.EPM.Web.Areas.Device.Models.VehicleflowModel
@{
    ViewBag.Title = "车道信息列表";
}
@using KingRoad.EPM.Common.Helper
@using (Html.BeginForm("TotalSplitPage", "VehicleFlow", null, FormMethod.Post, new { id = "pagerForm", onsubmit = "return divSearch(this,'tjxx_list');" }))
{
    <input type="hidden" name="pageNum" value="1" />
    <input type="hidden" name="numPerPage" value="@(ViewBag.numPerPage)" />
    <input type="hidden" name="input_roadId" value="@(ViewBag.roadId)" />
   
    <ul class="searchBar">
        <li><span>上报时间：</span>
            <input type="text"  style="width: auto" name="iput_timestart" value="@(ViewBag.iput_timestart)" class="date" />
            <select name="sel_shour" style="width: auto">
                <option value="0">0时</option>
                @for (int i = 1; i < 24; i++)
                {
                    <option value="@i">@i 时</option> 
                }
            </select>
            <select name="sel_sminute" style="width: auto">
                <option value="0">0分</option>
                @for (int i = 1; i < 60; i++)
                {
                    <option value="@i">@i 分</option> 
                }
            </select>

            <span>-</span>
            <input type="text"  style="width: auto" name="iput_timeend" value="@(ViewBag.iput_timeend)" class="date" />
            <select name="sel_ehour" style="width: auto">
                <option value="23">23时</option>
                @for (int i = 0; i < 24; i++)
                {
                    <option value="@i">@i 时</option> 
                }
            </select>
            <select name="sel_eminute" style="width: auto">
                <option value="59">59分</option>
                @for (int i = 0; i < 60; i++)
                {
                    <option value="@i">@i 分</option> 
                }
            </select>
        </li>
        <li>
            <button type="submit" class="btn btn-success btn-xs">
                搜索</button>
        </li>
    </ul>
}
<div class="panelBar" style="border-top: none;">
    <ul class="toolBar">

        <li>
            @Html.PermissionButton("Device.Roadway.Export", "Device_Roadway_Export",
                    Url.Action("Excel", "Roadway", new { PlacId = ViewBag.PlacId, danwei = ViewBag.danwei }),
                    "导出",
                    new Dictionary<string, object>
                    {
                        {"class","export"} ,{"targettype","navTab"},{"title","导出EXCEL"}
                    })
        </li>
    </ul>
</div>


<table class="table" width="100%" layouth="124" nowraptd="false" aria-relevant="tjxx_list">
    <thead>
        <tr>

            <th width="30" align="center">序号
            </th>
            <th width="60" align="center">车道
            </th>
            <th width="20" align="center">车型
            </th>
            <th width="20" align="center">数量
            </th>

        </tr>
    </thead>
    <tbody>
        @{ int num = (ViewBag.pageNum - 1) * ViewBag.numPerPage;}
        @foreach (var item in Model.list)
        {
            num += 1;
            <tr>

                <td align="center">@num
                </td>

                <td align="center">@item.RoadName
                </td>

                <td align="center">@item.Numb 轴车
                </td>
                <td align="center">@item.GNumb 辆
                </td>

            </tr>
               
        }
    </tbody>
</table>
<div class="panelBar" style="border-bottom: none;">
    <div class="pages" style="float: right">
        <span>显示</span>
        <select class="comsplitpage" name="numPerPage" onchange="navTabPageBreak({numPerPage:this.value},'tjxx_list')">
            <option value="10" @(ViewBag.numPerPage == 10 ? "selected='selected'" : "")>10</option>
            <option value="20" @(ViewBag.numPerPage == 20 ? "selected='selected'" : "")>20</option>
            <option value="50" @(ViewBag.numPerPage == 50 ? "selected='selected'" : "")>50</option>
        </select>
        <span>条，共@(ViewBag.pagenumshown)页,@(ViewBag.totalcount)条</span>
    </div>
    <div class="pagination" style="margin:0px;float:left; margin-left:35%" rel="tjxx_list" totalcount="@(ViewBag.totalcount)" numperpage="@(ViewBag.numPerPage)" pagenumshown="10" currentpage="@(ViewBag.pageNum)">
    </div>
    <script type="text/javascript">
        $(document).ready(function () {
            $("select[name='sel_shour']:eq(0)").find("option[value='@(ViewBag.sel_shour)']").attr("selected", true);
            $("select[name='sel_sminute']:eq(0)").find("option[value='@(ViewBag.sel_sminute)']").attr("selected", true);
            $("select[name='sel_ehour']:eq(0)").find("option[value='@(ViewBag.sel_ehour)']").attr("selected", true);
            $("select[name='sel_eminute']:eq(0)").find("option[value='@(ViewBag.sel_eminute)']").attr("selected", true);
        
    });
    </script>
</div>
